<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
		<style>
			.father {
				width: 200px;
				height: 200px;
				background-color: red;
				position: absolute;
				left: 50%;
				top: 50%;
				transform: translate(-50%, -50%);
			}
			/* 兼容性不好，只支持ie9以上的浏览器 */
		</style>
	</head>
	<body>
		<div class="father">
		这是内容
		</div>
	</body>
</html>
